import React from "react";
import { HashRouter, Route, Switch } from "react-router-dom";
import Index from "./pages/index/index";
import Clock from "./pages/clock/clock";
import Me from "./pages/me/index";
import Learn from "./pages/learn/index";
import ClockDate from "./pages/clock/date";
import Show from "./pages/show";
import Invite from "./pages/me/invite";
import Recommend from "./pages/me/recommend";
import Meclock from "./pages/clock/index";
import Melearn from "./pages/me/learn";
import Rank from "./pages/rank";
import Topic from "./pages/learn/topic";
import Course from "./pages/learn/course";
import Help from "./pages/help";
import Integral from "./pages/me/integral";
import Progress from "./pages/progress";
import Search from "./pages/search";

export default () => {
  return (
    <div>
      <HashRouter>
        <Switch>
          <Route exact path="/" component={Index} />
          <Route exact path="/search/:keywords" component={Search} />
          <Route exact path="/clock" component={Clock} />
          <Route exact path="/clockDate/:id" component={ClockDate} />
          <Route exact path="/show/:id" component={Show} />
          <Route exact path="/progress/:id" component={Progress} />
          <Route exact path="/me" component={Me} />
          <Route exact path="/meclock/:id" component={Meclock} />
          <Route exact path="/melearn" component={Melearn} />
          <Route exact path="/integral" component={Integral} />
          <Route exact path="/rank/:id" component={Rank} />
          <Route exact path="/invite" component={Invite} />
          <Route exact path="/recommend" component={Recommend} />
          <Route exact path="/learn" component={Learn} />
          <Route exact path="/course/:id" component={Course} />
          <Route exact path="/topic/:sid/:cid" component={Topic} />
          <Route exact path="/help" component={Help} />
          <Route exact path="*" component={Index} />
        </Switch>
      </HashRouter>
    </div>
  );
};
